package com.example.actionbaremenus;

import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;


public class Menu extends ListActivity {

	private String[] praticas = {
		"Pratica 1",
		"Sair",	
	};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, praticas));
	}
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		// TODO Auto-generated method stub
		super.onListItemClick(l, v, position, id);
		Intent it = null;
		
		switch (position) {
		case 0:
			it = new Intent(this, Pratica1.class);
			startActivity(it);
			break;

		default:
			break;
		}
		
	}
	
}
